<?php

namespace App\Http\Controllers\Web;

use EasyWeChat\Foundation\Application;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Log;

class WeChatController extends Controller
{
    public function server()
    {
        info('require'); # 注意：Log 为 Laravel 组件，所以它记的日志去 Laravel 日志看，而不是 EasyWeChat 日志

        $wechat = new Application(config('wechat'));

        info('response');

        $response = $wechat->server->serve();
        return $response;
    }

    public function test()
    {
        return 'hello world';
    }
}
